package com.lzx.api;

public enum ResultCode implements IErrorCode {
    /*请求成功默认返回*/
    SUCCESS(200, "操作成功"),
    /*请求失败默认返回*/
    FAILED(500, "操作失败"),
    /*参数验证失败默认返回*/
    VALIDATE_FAILED(404, "参数检验失败"),
    /*暂未登录或token已经过期默认返回*/
    UNAUTHORIZED(401, "暂未登录或token已经过期"),
    /*没有相关权限默认返回*/
    FORBIDDEN(403, "没有相关权限");

    private final long code;

    private final String msg;

    ResultCode(long code, String msg) {
        this.code = code;
        this.msg = msg;
    }
    @Override
    public long getCode() {
        return code;
    }

    @Override
    public String getMsg() {
        return msg;
    }
}
